package com.dragon.modules.yuegou.model.merchant;

import com.dragon.modules.yuegou.entity.merchant.MerchantLevelRuleEntity;
import com.dragon.modules.yuegou.enums.merchant.MerchantLevelRuleBargainStatus;
import com.dragon.modules.yuegou.enums.merchant.MerchantLevelRuleCashCouponStatus;
import com.dragon.modules.yuegou.enums.merchant.MerchantLevelRuleGiftCouponStatus;
import com.dragon.modules.yuegou.enums.merchant.MerchantLevelRuleGroupStatus;
import com.dragon.modules.yuegou.enums.merchant.MerchantLevelRuleIsDefault;
import com.dragon.modules.yuegou.enums.merchant.MerchantLevelRuleRecYuegouStatus;
import com.dragon.modules.yuegou.enums.merchant.MerchantLevelRuleStatus;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 等级规则模型类
 *
 * @author pbuilder generated
 * @date 2019-09-23 15:26:31
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class MerchantLevelRule extends MerchantLevelRuleEntity {

	private List<MerchantLevelRuleDetail> levelRuleDetailList;
	
	@ApiModelProperty("有效期开始时间")
	private LocalDateTime startTime;
	
	@ApiModelProperty("有效期结束时间")
	private LocalDateTime endTime;

	@ApiModelProperty("创建人名称")
	private String createdName;

	@ApiModelProperty("商家是否是当前等级")
	private Boolean whether;
	
	public LocalDateTime getEndTime() {
		return endTime;
	}
	public void setEndTime(LocalDateTime endTime) {
		this.endTime = endTime;
	}
	public LocalDateTime getStartTime() {
		return startTime;
	}
	public void setStartTime(LocalDateTime startTime) {
		this.startTime = startTime;
	}
	public Boolean getWhether() {
		return whether;
	}
	public void setWhether(Boolean whether) {
		this.whether = whether;
	}
	public List<MerchantLevelRuleDetail> getLevelRuleDetailList() {
		return levelRuleDetailList;
	}
	/**
	 * 设置等级规则详细列表
	 * @param levelRuleDetailList
	 * @return
	 */
	public MerchantLevelRule setLevelRuleDetailList(List<MerchantLevelRuleDetail> levelRuleDetailList) {
		this.levelRuleDetailList = levelRuleDetailList;
		return this;
	}
	/**
	 * 构造一个空等级规则模型对象
	 */
	public MerchantLevelRule(){
		super();
	}

	/**
	 * 依据实体对象的信息构造一个等级规则模型对象
	 *
	 * @param entity 实体对象
	 */
	public MerchantLevelRule(MerchantLevelRuleEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个等级规则模型对象
	 *
	 * @param other 其它对象
	 */
	public MerchantLevelRule(MerchantLevelRule other){
		super(other);
	}


	@Override
	public String getId() {
		return id;
	}

	/**
	 * 设置
	 *
	 * @param id
	 * @return 当前对象
	 */
	public MerchantLevelRule id(String id) {
		this.id = id;
		return this;
	}

	@Override
	public String getLevelName() {
		return levelName;
	}

	/**
	 * 设置等级名称
	 *
	 * @param levelName 等级名称
	 * @return 当前对象
	 */
	public MerchantLevelRule levelName(String levelName) {
		this.levelName = levelName;
		return this;
	}

	@Override
	public MerchantLevelRuleIsDefault getIsDefault() {
		return isDefault;
	}

	/**
	 * 设置[枚举]是否默认：1-是-YES、0-否-NO
	 *
	 * @param isDefault [枚举]是否默认：1-是-YES、0-否-NO
	 * @return 当前对象
	 */
	public MerchantLevelRule isDefault(MerchantLevelRuleIsDefault isDefault) {
		this.isDefault = isDefault;
		return this;
	}

	@Override
	public MerchantLevelRuleStatus getStatus() {
		return status;
	}

	/**
	 * 设置[枚举]状态：1-已上架-NORMAL、0-已下架-DISABLE
	 *
	 * @param status [枚举]状态：1-已上架-NORMAL、0-已下架-DISABLE
	 * @return 当前对象
	 */
	public MerchantLevelRule status(MerchantLevelRuleStatus status) {
		this.status = status;
		return this;
	}

	@Override
	public String getImg() {
		return img;
	}

	/**
	 * 设置等级图片
	 *
	 * @param img 等级图片
	 * @return 当前对象
	 */
	public MerchantLevelRule img(String img) {
		this.img = img;
		return this;
	}

	@Override
	public String getDescription() {
		return description;
	}

	/**
	 * 设置等级说明
	 *
	 * @param description 等级说明
	 * @return 当前对象
	 */
	public MerchantLevelRule description(String description) {
		this.description = description;
		return this;
	}

	@Override
	public MerchantLevelRuleCashCouponStatus getCashCouponStatus() {
		return cashCouponStatus;
	}

	/**
	 * 设置[枚举]是否开启天天抢券:：1-开启-ON、0-未开启-OFF
	 *
	 * @param cashCouponStatus [枚举]是否开启天天抢券:：1-开启-ON、0-未开启-OFF
	 * @return 当前对象
	 */
	public MerchantLevelRule cashCouponStatus(MerchantLevelRuleCashCouponStatus cashCouponStatus) {
		this.cashCouponStatus = cashCouponStatus;
		return this;
	}

	@Override
	public MerchantLevelRuleGroupStatus getGroupStatus() {
		return groupStatus;
	}

	/**
	 * 设置[枚举]是否开启全民拼团：1-开启-ON、0-未开启-OFF
	 *
	 * @param groupStatus [枚举]是否开启全民拼团：1-开启-ON、0-未开启-OFF
	 * @return 当前对象
	 */
	public MerchantLevelRule groupStatus(MerchantLevelRuleGroupStatus groupStatus) {
		this.groupStatus = groupStatus;
		return this;
	}

	@Override
	public MerchantLevelRuleBargainStatus getBargainStatus() {
		return bargainStatus;
	}

	/**
	 * 设置[枚举]是否开启疯狂砍价：1-开启-ON、0-未开启-OFF
	 *
	 * @param bargainStatus [枚举]是否开启疯狂砍价：1-开启-ON、0-未开启-OFF
	 * @return 当前对象
	 */
	public MerchantLevelRule bargainStatus(MerchantLevelRuleBargainStatus bargainStatus) {
		this.bargainStatus = bargainStatus;
		return this;
	}

	@Override
	public MerchantLevelRuleRecYuegouStatus getRecYuegouStatus() {
		return recYuegouStatus;
	}

	/**
	 * 设置[枚举]是否开启推荐到月悦购：1-开启-ON、0-未开启-OFF
	 *
	 * @param recYuegouStatus [枚举]是否开启推荐到月悦购：1-开启-ON、0-未开启-OFF
	 * @return 当前对象
	 */
	public MerchantLevelRule recYuegouStatus(MerchantLevelRuleRecYuegouStatus recYuegouStatus) {
		this.recYuegouStatus = recYuegouStatus;
		return this;
	}

	@Override
	public MerchantLevelRuleGiftCouponStatus getGiftCouponStatus() {
		return giftCouponStatus;
	}

	/**
	 * 设置[枚举]是否开启创建礼品券：1-开启-ON、0-未开启-OFF
	 *
	 * @param giftCouponStatus [枚举]是否开启创建礼品券：1-开启-ON、0-未开启-OFF
	 * @return 当前对象
	 */
	public MerchantLevelRule giftCouponStatus(MerchantLevelRuleGiftCouponStatus giftCouponStatus) {
		this.giftCouponStatus = giftCouponStatus;
		return this;
	}

	@Override
	public BigDecimal getServiceDiscount() {
		return serviceDiscount;
	}

	/**
	 * 设置服务费折扣
	 *
	 * @param serviceDiscount 服务费折扣
	 * @return 当前对象
	 */
	public MerchantLevelRule serviceDiscount(BigDecimal serviceDiscount) {
		this.serviceDiscount = serviceDiscount;
		return this;
	}

	@Override
	public Integer getGiftCouponLimit() {
		return giftCouponLimit;
	}

	/**
	 * 设置每天限创礼品券数量
	 *
	 * @param giftCouponLimit 每天限创礼品券数量
	 * @return 当前对象
	 */
	public MerchantLevelRule giftCouponLimit(Integer giftCouponLimit) {
		this.giftCouponLimit = giftCouponLimit;
		return this;
	}

	@Override
	public LocalDateTime getCreatedTime() {
		return createdTime;
	}

	/**
	 * 设置
	 *
	 * @param createdTime
	 * @return 当前对象
	 */
	public MerchantLevelRule createdTime(LocalDateTime createdTime) {
		this.createdTime = createdTime;
		return this;
	}

	@Override
	public String getCreatedBy() {
		return createdBy;
	}

	public void setCreatedName(String createdName) {
		this.createdName = createdName;
	}

	public String getCreatedName() {
		return createdName;
	}

	/**
	 * 设置
	 *
	 * @param createdBy
	 * @return 当前对象
	 */
	public MerchantLevelRule createdBy(String createdBy) {
		this.createdBy = createdBy;
		return this;
	}

	@Override
	public LocalDateTime getModifiedTime() {
		return modifiedTime;
	}

	/**
	 * 设置
	 *
	 * @param modifiedTime
	 * @return 当前对象
	 */
	public MerchantLevelRule modifiedTime(LocalDateTime modifiedTime) {
		this.modifiedTime = modifiedTime;
		return this;
	}

	@Override
	public String getModifiedBy() {
		return modifiedBy;
	}

	/**
	 * 设置
	 *
	 * @param modifiedBy
	 * @return 当前对象
	 */
	public MerchantLevelRule modifiedBy(String modifiedBy) {
		this.modifiedBy = modifiedBy;
		return this;
	}
}